package day18.feifei.homework;

public class Second {
    public static void main(String[] args) {
        One one = new One();
        one.start();

        Two two = new Two();
        Thread thread = new Thread(two);
        thread.start();
    }
}

class One extends Thread {
    @Override
    public void run() {
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0)
                System.out.println(this.getName() + "----->" + i);
        }
    }
}

class Two implements Runnable {

    @Override
    public void run() {
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0)
                System.out.println(Thread.currentThread().getName() + "----->" + i);
        }
    }
}
